package com.cy.cy2025.adapter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.cy.cy2025.R
import com.cy.cy2025.entity.MainItem

class MainAdapter : BaseQuickAdapter<MainItem, QuickViewHolder>() {
    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(R.layout.item_main, parent)
    }

    override fun onBindViewHolder(
        holder: QuickViewHolder,
        position: Int,
        item: MainItem?
    ) {
        holder.setText(R.id.tv_item, item?.title?:"---")
    }


}